package com.kuizii.server.config;


import com.kuizii.server.discovery.RegisterProperties;
import com.kuizii.server.net.IOManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;


@Configuration
public class BootstrapListener implements ApplicationListener<ApplicationStartedEvent> {

    @Autowired
    IOManager ioManager;

    @Autowired
    RegisterProperties properties;


    @Override
    public void onApplicationEvent(ApplicationStartedEvent applicationStartedEvent) {
        ioManager.init(properties);
    }

}
